import request from '@/utils/request'

let baseMapping = "/exam_service/writing/";

export default {

  // 分页获取写译信息
  getList(current, limit, write) {
    return request({
      url: baseMapping + `query/${current}/${limit}`,
      method: 'post',
      data: write
    })
  },

  // 通过id获取写译信息
  getWrite(id) {
    return request({
      url: baseMapping + `getWriteById/${id}`,
      method: 'get'
    })
  },

  // 通过id获取写译信息
  delete(id) {
    return request({
      url: baseMapping + `deleteWriting/${id}`,
      method: 'get'
    })
  },

  // 添加写译信息
  add(write) {
    return request({
      url: baseMapping + `addWriting`,
      method: 'post',
      data: write
    })
  },

  // 修改写译信息
  update(write) {
    return request({
      url: baseMapping + `updateWriting`,
      method: 'post',
      data: write
    })
  }
}
